#!/bin/bash
#############
# zhangjd01
# 2023.2.14
#############

function copy() {
    /usr/bin/expect <<EOF
    spawn scp -r $user@$ip:/mnt-xc/fengchao-portal-storage-nfs-pvc-6058dbf3-3033-4e78-901f-5d1b4de1d9d3/iiw-log /opt/gocron/result/
    
    expect {
	"password" {send "ZTNwr&#mtM6APUecSE\r"}
    }

    expect eof
EOF
}

ip=10.50.132.11
user=root

copy
